import request from '@/utils/request'

// 获取认证信息
export function getStaffCertification() {
  return request({
    url: '/certification/getStaffCertification',
    method: 'get'
  })
}

// 根据员工id获取认证信息
export function findByStaffId(data) {
  return request({
    url: '/certification/findByStaffId',
    method: 'get',
    params: data
  })
}

// 检测手机号唯一性
export function checkMobileUnique(data) {
  return request({
    url: '/certification/checkMobile',
    method: 'get',
    params: data
  })
}

// 提交认证 个人实名认证 (手机/银行卡)
export function personCer(query) {
  return request({
    url: '/certification/personCer',
    method: 'post',
    data: query
  })
}

// 根据手机号 查询是否有跳转合同
export function goSignByMobile(mobile) {
  return request({
    url: '/certification/goSignByMobile/'+mobile,
    method: 'get',
  })
}

// 提交认证 个人实名认证 (人脸识别前的手机号三网认证)
export function personCerFaceBeforeCerPhone(query) {
  return request({
    url: '/certification/personCerFaceBeforeCerPhone',
    method: 'post',
    data: query
  })
}

// 个人实名认证 (人脸识别) 个人脸识别录制文件上传
export function personCerFace(data) {
  return request({
    url: '/certification/personCerFace',
    method: 'post',
    data: data
  })
}

// 法人实名认证 （人脸识别）录制文件上传
export function companyCerFace(data) {
  return request({
    url: '/ec/companyLegalCertification/companyCerFace',
    method: 'post',
    data: data
  })
}

// 法人首次注册企业认证 （人脸识别）录制文件上传
export function companyCerFaceNewCompany(data) {
  return request({
    url: '/ec/companyLegalCertification/companyCerFaceNewCompany',
    method: 'post',
    data: data
  })
}

// 检查是否认证成功
export function checkPersonCerStatus() {
  return request({
    url: '/certification/checkPersonCerStatus',
    method: 'get'
  })
}

// 证件完善
export function credentialPerfect(data) {
  return request({
    url: '/certification/credentialPerfect',
    method: 'post',
    data: data
  })
}

